package com.bins.es.service;

import com.bins.es.common.ResultBody;
import com.bins.es.eo.UserModel;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;
import java.util.Optional;

public interface UserService {

    Optional<UserModel> findById(Long id);

    ResultBody<UserModel> save(UserModel user);

    void delete(UserModel user);

    List<UserModel> findAll();

    Page<UserModel> findByAge(Integer age, PageRequest pageRequest);

    Page<UserModel> findByGender(String gender, PageRequest pageRequest);
}
